// 查看产品详情
var Display = document.querySelector('.mid_right_display');
var Detail = document.querySelector('.mid_right_detail');
var Photo = document.querySelector('.pro_detail_photo img');
var Title = document.querySelector('.pro_title h3');
var Search = document.querySelector('.search');

// 显示产品展示
function RightDisplay() {
    Display.style.display = 'block';
    Search.style.display = 'block';
    Detail.style.display = 'none';
}

// 显示产品详情
function RightDetail(index) {
    Display.style.display = 'none';
    Search.style.display = 'none';
    Detail.style.display = 'block';
    switch (index) {
        case 1:
            Photo.src = "../imgs/pro-center1.jpg";
            Title.innerHTML = '微波炉-MA323BFS';
            break;
        case 2:
            Photo.src = "../imgs/pro-center2.jpg";
            Title.innerHTML = '饮水机-NC-ZA1';
            break;
        case 3:
            Photo.src = "../imgs/pro-center4.jpg";
            Title.innerHTML = '迷你音响-RS-168';
            break;
        case 4:
            Photo.src = "../imgs/pro-center3.jpg";
            Title.innerHTML = '电饭锅-RC-10ZWH';
            break;
        case 5:
            Photo.src = "../imgs/pro-center5.jpg";
            Title.innerHTML = '空气净化器-FES-547';
            break;
        case 6:
            Photo.src = "../imgs/pro-center6.jpg";
            Title.innerHTML = '电热水器-ARC-1';
            break;
        case 7:
            Photo.src = "../imgs/product07.png";
            Title.innerHTML = '迷你风扇-HES-1483';
            break;
        case 8:
            Photo.src = "../imgs/product08.png";
            Title.innerHTML = '迷你风扇-HE-1359';
            break;
        case 9:
            Photo.src = "../imgs/product09.png";
            Title.innerHTML = '智能吸尘器-DE-137';
            break;
        case 10:
            Photo.src = "../imgs/product10.png";
            Title.innerHTML = '打印机-DJ-360';
            break;
        case 11:
            Photo.src = "../imgs/product11.png";
            Title.innerHTML = '饮水机-NC-648';
            break;
        case 12:
            Photo.src = "../imgs/product12.png";
            Title.innerHTML = '电驱虫器-DQ-173';
            break;
    }
}